package com.marcowu.study.spb.admclient.jmx;

import org.springframework.jmx.export.annotation.ManagedOperation;
import org.springframework.jmx.export.annotation.ManagedResource;
import org.springframework.stereotype.Service;

@Service
@ManagedResource(objectName = "com.marcowu:name=serverInfo")
public class ServerInfo implements ServerInfoMBean {

  private int a = 0;

  @Override
  public int getExecuteSqlCmdCount() {
    return a;
  }

  @ManagedOperation
  @Override
  public void changeA(int n) {
    a = n;
  }
}
